package ink.lovejinhu.leetcode;

/**
 * @author jinhu
 * created 2021-08-09 16:29
 */
public class Solution_0796 {
    public boolean rotateString(String s, String goal) {
        String s2 = s + s;
        int start = 0;
        int end = s.length();
        for (int i = 0; i < s.length(); i++) {
            String temp = s2.substring(start, end);
            if (temp.equals(goal)) {
                return true;
            }
            start++;
            end++;
        }
        return false;

    }
}
